package com.yhp.service.impl;

import com.yhp.bean.Student;
import com.yhp.dao.impl.StudentDaoImpl;
import com.yhp.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    StudentDaoImpl studentDao = new StudentDaoImpl();

    @Override
    public List<Student> getStudent(String name, String id, int sex,int pageIndex,int pageSize) {
        return studentDao.getStudent(name, id, sex,pageIndex,pageSize);
    }

    @Override
    public int total(String name, String id, int sex) {
        return studentDao.total(name,id,sex);
    }


    @Override
    public int addStudent(Student student) {
        return studentDao.addStudent(student);
    }

    @Override
    public Student getById(String id) {
        return studentDao.getById(id);
    }

    @Override
    public int upDate(String id, Student student) {
        return studentDao.upDate(id,student);
    }

    @Override
    public int delete(String id) {
        return studentDao.delete(id);
    }
}
